package com.beyond.trace.domain.dto.warn.device;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName: WaterQualityStation
 * @author: z越
 * @date: 2023/2/27  14:57
 * @description 水质设备数据详情
 */
@Data
public class WaterQualityStation implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 设备编号
     */
    private String imei;

    /**
     * 溶解氧 mg/L
     */
    private Double waterDo;

    /**
     * 水质ph ph
     */
    private Double waterPh;

    /**
     * 水温
     */
    private Double waterTemp;

    /**
     * 水位 cm
     */
    private Double waterLevel;

    /**
     * 电导率 ec值 ms/cm
     */
    private Double waterEc;

    /**
     * 浊度  ntu
     */
    private Double waterFtu;

    // 氨氮 mg/L
    private Double waterNh;

    /**
     * 数据时间
     */
    private Date upTime;

    /**
     * 创建时间
     */
    private Date createAt;

    public WaterQualityStation(JSONObject object){
        this.waterFtu = object.getDouble("waterFtu");
        this.waterTemp = object.getDouble("waterTemp");
        this.waterPh = object.getDouble("waterPh");
        this.waterNh = object.getDouble("waterNh");
        this.waterLevel = object.getDouble("waterLevel");
        this.waterEc = object.getDouble("waterEc");
        this.waterDo = object.getDouble("waterDo");
    }

}
